﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _1
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = "1 2 3 4 5 6 7 8 9 10";
            List<string> odd = new List<string>();
            List<string> even = new List<string>();
            string[] vs = s.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);
            foreach (string item in vs)
            {
                if (int.Parse(item)%2 != 0)
                {
                    odd.Add(item);
                }
                else
                {
                    even.Add(item);
                }
            }
            odd.AddRange(even);
            //在数组中添加指定间隔符
            string r = string.Join(" ", odd);
            Console.WriteLine(r);
            Console.ReadKey();
        } 
    }
}
